#Celery task for ml api

description "Celery ML api"
author "Vik Paruchuri <vik@edx.org>"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 3 30

env DJANGO_SETTINGS_MODULE={{discern_settings}}

chdir {{discern_dir}}
setuid {{discern_user}}

exec {{venv_dir}}/bin/python {{discern_dir}}/manage.py celeryd --loglevel=info --settings={{discern_settings}} --pythonpath={{discern_dir}} -B --autoscale={{ ansible_processor_cores * 2 }},1
